package com.choudou5.nlp.config;

import java.io.Serializable;

/**
 * @name 应用Key Bean
 * @author choudou5
 * @date 2018-08-07
 */
public class AppKeyBean implements Serializable {

    private String secretId;
    private String secretKey;
    private Integer remainCount; //剩余数

    public AppKeyBean() {
    }

    public AppKeyBean(String secretId, String secretKey) {
        this.secretId = secretId;
        this.secretKey = secretKey;
    }

    public AppKeyBean(String secretId, String secretKey, Integer remainCount) {
        this.secretId = secretId;
        this.secretKey = secretKey;
        this.remainCount = remainCount;
    }

    private boolean busy;

    public String getSecretId() {
        return secretId;
    }

    public void setSecretId(String secretId) {
        this.secretId = secretId;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public Integer getRemainCount() {
        return remainCount;
    }

    public Integer useOne() {
        return remainCount--;
    }

    public void setRemainCount(Integer remainCount) {
        this.remainCount = remainCount;
    }

    public boolean isBusy() {
        return busy;
    }

    public void setBusy(boolean busy) {
        this.busy = busy;
    }
}
